home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / U.S. System⁄HyperCard / HyperCard—US 1.2.5 / HyperCard Ideas-US 1.2.5 / Idea Stacks / Stack Ideas / background_47042.txt < prev    next >
Encoding:
Text File  |  1988-11-07  |  6.4 KB  |  299 lines

  1. -- background: 47042 from stack: in
  2. -- bmap block id: 36625
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on newStack
  8.   extend
  9. end newStack
  10.  
  11. on extend
  12.   -- type "extend" into the message box and press return to make
  13.   -- three months worth of new cards.
  14.   if the name of this stack contains "stack ideas"
  15.   then
  16.   answer "Please make a new stack before extending it." with "OK"
  17. else
  18.   answer "Make three months more of new cards?" with "OK" or "Cancel"
  19.   if it is "Cancel" then exit extend
  20.   go to last card of this background
  21.   put getStartDate() into start      --what date to begin on
  22.   if start is "Cancel" then exit extend
  23.   put 60*60*24 into OneDay      --seconds in a day
  24.   repeat with cnt = 1 to (365 div 4)   --three months
  25.     put start into it        --a copy
  26.     convert it to long date
  27.     put it into field "Date"
  28.     add OneDay to start
  29.     doMenu New Card
  30.   end repeat
  31.   convert start to long date     --fix the last card
  32.   put start into field "Date"
  33. end if
  34. end extend
  35.  
  36. function getStartDate
  37. -- end of stack or today, whichever is newer
  38. get field "Date"
  39. if it is empty then put the short date into it
  40. convert it to seconds    --so we can compare
  41. put the short date into today
  42. convert today to seconds
  43. if today < 2587766400 then
  44.   answer "Set the Control Panel to today's date" with "OK"
  45.   return "Cancel"
  46. end if
  47. if it >= today then return it   --calendar already beyond today
  48. convert it to short date
  49. answer "Start from which date?" with it or the short date or "Cancel"
  50. if it is "Cancel" then return it
  51. convert it to seconds
  52. return it
  53. end getStartDate
  54.  
  55. on openBackground
  56.   push recent card
  57. end openBackground
  58.  
  59.  
  60. -- part 1 (field)
  61. -- low flags: 00
  62. -- high flags: 4000
  63. -- rect: left=338 top=68 right=300 bottom=485
  64. -- title width / last selected line: 0
  65. -- icon id / first selected line: 0 / 0
  66. -- text alignment: 0
  67. -- font id: 3
  68. -- text size: 10
  69. -- style flags: 0
  70. -- line height: 13
  71. -- part name: 
  72.  
  73.  
  74. -- part 2 (field)
  75. -- low flags: 00
  76. -- high flags: 4000
  77. -- rect: left=69 top=55 right=302 bottom=329
  78. -- title width / last selected line: 0
  79. -- icon id / first selected line: 0 / 0
  80. -- text alignment: 0
  81. -- font id: 3
  82. -- text size: 10
  83. -- style flags: 0
  84. -- line height: 13
  85. -- part name: 
  86.  
  87.  
  88. -- part 3 (button)
  89. -- low flags: 00
  90. -- high flags: 0000
  91. -- rect: left=265 top=313 right=340 bottom=293
  92. -- title width / last selected line: 0
  93. -- icon id / first selected line: 8419 / 8419
  94. -- text alignment: 1
  95. -- font id: 0
  96. -- text size: 12
  97. -- style flags: 0
  98. -- line height: 16
  99. -- part name: Next
  100. ----- HyperTalk script -----
  101. on mouseUp
  102.   visual effect wipe left
  103.   go to next card
  104. end mouseUp
  105.  
  106.  
  107.  
  108. -- part 4 (button)
  109. -- low flags: 00
  110. -- high flags: 0000
  111. -- rect: left=239 top=313 right=340 bottom=268
  112. -- title width / last selected line: 0
  113. -- icon id / first selected line: 17779 / 17779
  114. -- text alignment: 1
  115. -- font id: 0
  116. -- text size: 12
  117. -- style flags: 0
  118. -- line height: 16
  119. -- part name: Prev
  120. ----- HyperTalk script -----
  121. on mouseUp
  122.   visual effect wipe right
  123.   go to prev card
  124. end mouseUp
  125.  
  126.  
  127.  
  128.  
  129. -- part 5 (button)
  130. -- low flags: 00
  131. -- high flags: 0000
  132. -- rect: left=476 top=314 right=339 bottom=507
  133. -- title width / last selected line: 0
  134. -- icon id / first selected line: 7417 / 7417
  135. -- text alignment: 1
  136. -- font id: 0
  137. -- text size: 12
  138. -- style flags: 0
  139. -- line height: 16
  140. -- part name: Return
  141. ----- HyperTalk script -----
  142. on mouseUp
  143.   visual effect iris close
  144.   pop card
  145. end mouseUp
  146.  
  147.  
  148.  
  149. -- part 7 (button)
  150. -- low flags: 00
  151. -- high flags: 0000
  152. -- rect: left=149 top=301 right=332 bottom=184
  153. -- title width / last selected line: 0
  154. -- icon id / first selected line: 0 / 0
  155. -- text alignment: 1
  156. -- font id: 0
  157. -- text size: 12
  158. -- style flags: 0
  159. -- line height: 16
  160. -- part name: 
  161. ----- HyperTalk script -----
  162. on mouseUp
  163.   get the selection
  164.   if it is empty then get the message
  165.   if it is empty then ask "Dial what number?"
  166.   if it is not empty then
  167.     push this card
  168.     visual effect zoom open
  169.     go to stack "Phone"
  170.     dial it
  171.     pop card
  172.   end if
  173. end mouseUp
  174.  
  175.  
  176.  
  177. -- part 8 (button)
  178. -- low flags: 00
  179. -- high flags: 0000
  180. -- rect: left=112 top=301 right=332 bottom=145
  181. -- title width / last selected line: 0
  182. -- icon id / first selected line: 0 / 0
  183. -- text alignment: 1
  184. -- font id: 0
  185. -- text size: 12
  186. -- style flags: 0
  187. -- line height: 16
  188. -- part name: Address
  189. ----- HyperTalk script -----
  190. on mouseUp
  191.   get the selection
  192.   visual effect zoom open
  193.   go to "Address"
  194.   if it is not empty then find it
  195. end mouseUp
  196.  
  197.  
  198.  
  199. -- part 9 (button)
  200. -- low flags: 00
  201. -- high flags: 0000
  202. -- rect: left=76 top=301 right=330 bottom=107
  203. -- title width / last selected line: 0
  204. -- icon id / first selected line: 0 / 0
  205. -- text alignment: 1
  206. -- font id: 0
  207. -- text size: 12
  208. -- style flags: 0
  209. -- line height: 16
  210. -- part name: Calendar
  211. ----- HyperTalk script -----
  212. on mouseUp
  213.   get the seconds
  214.   convert it to dateItems
  215.   put ((item 1 of it) - 1987) *2 into whichSix
  216.   if item 2 of it > 6 then add 1 to whichSix
  217.   visual effect zoom open
  218.   if whichSix < 1 then go card 1 of stack "Datebook"
  219.   else if whichSix > 5 then go card 5 of stack "Datebook"
  220.   else
  221.     go to card whichSix of stack "Datebook"
  222.     send "bracketWeek" && the seconds to this card
  223.   end if
  224. end mouseUp
  225.  
  226.  
  227.  
  228. -- part 10 (button)
  229. -- low flags: 00
  230. -- high flags: 0000
  231. -- rect: left=44 top=301 right=330 bottom=74
  232. -- title width / last selected line: 0
  233. -- icon id / first selected line: 0 / 0
  234. -- text alignment: 1
  235. -- font id: 0
  236. -- text size: 12
  237. -- style flags: 0
  238. -- line height: 16
  239. -- part name: Datebook/Active
  240. ----- HyperTalk script -----
  241. on mouseUp
  242.   answer "This is a Daily Calendar"with OK
  243. end mouseUp
  244.  
  245.  
  246.  
  247.  
  248. -- part 11 (button)
  249. -- low flags: 00
  250. -- high flags: 0000
  251. -- rect: left=3 top=299 right=333 bottom=42
  252. -- title width / last selected line: 0
  253. -- icon id / first selected line: 1011 / 1011
  254. -- text alignment: 1
  255. -- font id: 0
  256. -- text size: 12
  257. -- style flags: 0
  258. -- line height: 16
  259. -- part name: Home
  260. ----- HyperTalk script -----
  261. on mouseUp
  262.   visual effect iris close
  263.   go "Home"
  264. end mouseUp
  265.  
  266.  
  267.  
  268. -- part 12 (field)
  269. -- low flags: 00
  270. -- high flags: 0000
  271. -- rect: left=6 top=24 right=51 bottom=395
  272. -- title width / last selected line: 0
  273. -- icon id / first selected line: 0 / 0
  274. -- text alignment: 0
  275. -- font id: 3
  276. -- text size: 18
  277. -- style flags: 256
  278. -- line height: 24
  279. -- part name: Date
  280.  
  281.  
  282. -- part 14 (button)
  283. -- low flags: 00
  284. -- high flags: 8004
  285. -- rect: left=438 top=294 right=309 bottom=484
  286. -- title width / last selected line: 0
  287. -- icon id / first selected line: 0 / 0
  288. -- text alignment: 1
  289. -- font id: 3
  290. -- text size: 9
  291. -- style flags: 0
  292. -- line height: 12
  293. -- part name: Extend
  294. ----- HyperTalk script -----
  295. on mouseUp
  296.   extend
  297. end mouseUp
  298.  
  299.